<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <title>编辑地址</title>
    <link href="../../public/css/animate.min.css" rel="stylesheet" type="text/css">
    <link href="../../public/css/mui.min.css" rel="stylesheet" type="text/css">
    <link href="../../public/css/mui.picker.css" rel="stylesheet" type="text/css">
    <link href="../../public/css/mui.poppicker.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="../css/createaddress.css">
    <script type="text/ecmascript" src="../../public/js/lib/md5.js"></script>
    <script src="../../public/js/lib/common.js"></script>
    <script src="../../public/js/lib/flexible.js"></script>
    <script src="../../public/js/lib/zepto.min.js"></script>
    <script src="../../public/js/lib/mui.min.js"></script>
    <script src="../../public/js/lib/mui.picker.js"></script>
    <script src="../../public/js/lib/mui.poppicker.js"></script>
    <script src="../../public/js/lib/city.data-3.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="../js/editaddress.js"></script>
</head>
<body>
<div class="glo">
    <div class="cart-content">
        <div class="nav-header">
            <div class="nav-title">编辑地址</div>
            <div class="nav-edit">
                <div class="icon-img"></div>
            </div>
            <div class="save-address">保存</div>
        </div>
        <div class="mui-content mui-table-view">
            <div class="mui-input-row">
                <label>收货人</label>
                <input type="text" maxlength="36" id="name" placeholder="必填" >
            </div>
            <div class="mui-input-row">
                <label class="text-alain-center">联系电话</label>
                <input type="number" maxlength="36" id="mobile" placeholder="必填">
            </div>
            <div id='showCityPicker3' class="mui-input-row">
                <label>所在地区</label>
                <!--<input type="hidden" id="regionName">-->
                <input type="text" id="region" placeholder="请选择地区" style="text-align: right">
                <div class="select-more"></div>
            </div>
            <div class="mui-input-row">
                <label>街道</label>
                <input type="text" id="street" placeholder="请选择街道" style="text-align: right">
                <div class="select-more"></div>
            </div>
            <div class="mui-input-row">
                <textarea type="text" maxlength="1024" id="detailed" placeholder="详细地址(不少于五个字)"></textarea>
            </div>
        </div>
    </div>
    <div class="sub-bottom">
        <div class="create-name">设为默认地址</div>
    </div>
</div>
<script>
    (function($, doc) {
      $.init();
      $.ready(function() {
        var _getParam = function(obj, param) {
          return obj[param] || '';
        };
        //级联示例
        var cityPicker3 = new $.PopPicker({
          layer: 3
        });
        cityPicker3.setData(cityData3);
        var showCityPickerButton = doc.getElementById('showCityPicker3');
        var cityResult3 = doc.getElementById('region');
        showCityPickerButton.addEventListener('tap', function(event) {
          cityPicker3.show(function(items) {
            cityResult3.value="" + _getParam(items[0], 'text') + " " + _getParam(items[1], 'text') + " " + _getParam(items[2], 'text');
            //返回 false 可以阻止选择框的关闭
            //return false;
          });
        }, false);
      });
    })(mui, document);
</script>
</body>
</html>